﻿<UserControl x:Class="AppMVVM.Views.ArticleListView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto"/>
            <RowDefinition />
        </Grid.RowDefinitions>
        
        <ListView Grid.Row="0" ItemsSource="{Binding Articles}" MouseLeftButtonUp="ListViewItem_PreviewMouseLeftButtonDown">
            <ListView.View>
                <GridView>
                    <GridViewColumn Header="Title" Width="150" DisplayMemberBinding="{Binding Title}" />
                    <GridViewColumn Header="Date" Width="100" DisplayMemberBinding="{Binding PublicationDate}"/>
                </GridView>
            </ListView.View>
            <ListView.ItemContainerStyle>
                <Style TargetType="ListViewItem">
                </Style>
            </ListView.ItemContainerStyle>
        </ListView>
        <GridSplitter Grid.Row="1" Height="2" 
                      HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
        <GroupBox x:Name="htmlContent" Grid.Row="2" />
    </Grid>
</UserControl>
